package top.banner.es;

import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.client.indices.CreateIndexRequest;
import org.elasticsearch.client.indices.GetIndexRequest;
import org.elasticsearch.client.indices.GetIndexResponse;

import java.io.IOException;

/**
 * @author XGL
 */
public class IndexSearch {



    public static void main(String[] args) throws IOException {
        final RestHighLevelClient client = ESClient.init();

        final GetIndexRequest request = new GetIndexRequest("user");

        final GetIndexResponse response = client.indices().get(request, RequestOptions.DEFAULT);

        System.out.println(response.getAliases());
        System.out.println(response.getMappings());
        System.out.println(response.getSettings());

        client.close();
    }
}
